package com.study.demo;

import com.stduy.BaseApplication;
import com.study.demo.injector.component.ApplicationComponent;
import com.study.demo.injector.component.DaggerApplicationComponent;
import com.study.demo.injector.module.ApplicationModule;

/**
 * Created by shangsong on 17-3-6.
 */

public class DemoApplication extends BaseApplication {
    private ApplicationComponent applicationComponent;

    @Override
    public void onCreate() {
        super.onCreate();
        initComponent();
    }

    private void initComponent() {
        applicationComponent = DaggerApplicationComponent.builder()
                .applicationModule(new ApplicationModule(this)).build();
    }

    public ApplicationComponent getApplicationComponent() {
        return applicationComponent;
    }

}
